package object;

public class Message {

    private int mid;//id
    private String title;//标题
    private String author;//用户名
    private String content;//内容

    public Message() {
    }

    public Message(int mid, String title, String author, String content) {
        this.mid = mid;
        this.title = title;
        this.author = author;
        this.content = content;
    }

    //修改字段
    public void updateMid(int id) {
        this.mid = id;
    }

    public void updateTitle(String title) {
        this.title = title;
    }

    public void updateAuthor(String author) {
        this.author = author;
    }

    public void updateContent(String content) {
        this.content = content;
    }

    //获取字段
    public int getMid() {
        return mid;
    }

    public String getTitle() {
        return title;
    }

    public String getAuthor() {
        return author;
    }

    public String getContent() {
        return content;
    }
}
